<?php
session_start() ; 
include "includes/functions.php" ; 
db() ; 
$zalog = (int)($_GET['num']) ; 

if($zalog>12 or $zalog<2)
	{
		echo "Невалидно число." ; 
	}
	else
	{
		$rand = rand(2,12) ; 
		if($rand==$zalog)
			{
				mysql_query('UPDATE users SET money=money+20,exp=exp+1,energy=energy-10 where user="'.$_SESSION['user_info']['user'].'"') ; 
				echo "Поздравление, спечелихте $20,1 опит и -10 енергия." ; 
			}
			else
			{
				echo "Падна се числото ".$rand."." ; 
			}
	}